/**
 * goods模块接口列表
 */

import base from './base'; // 导入接口域名列表
import axios from '@/utils/http'; // 导入http中创建的axios实例
import qs from 'qs'; // 根据需求是否导入qs模块

const goods = {
    
    addCart(params: any){
        return axios.post(`${base.cart}/addCart`, qs.stringify(params));
    },
    getCartList(params: any){
        return axios.post(`${base.cart}/getCartList`, qs.stringify(params));
    },
    deleteCart(id: any){
        return axios.delete(`${base.cart}/deleteCart/${id}`);
    },
    deleteCartByIds(params: any){
        return axios.post(`${base.cart}/deleteCartByIds`, {ids:params});
    },
    editCart(params: any){
        return axios.post(`${base.cart}/editCart`, qs.stringify(params));
    }

}

export default goods;